#include <stdio.h>

void str_read(char*str) {
	int i=0;
	while(1) {
		scanf("%c",&str[i]);
		if(str[i] == '\n') {
			break;
		}
		i++;
	}
	str[i] = '\0';
}

int main()
{
	char n;
	int num;
	//str_read(str);
	while(scanf("%d",&num)!=1) {
		while(scanf("%c",&n)==1&&n!='\n') {
			continue;
		}
	}
	printf("%d\n",num);
	return 0;
}